<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>疫苗管理</title>
	<meta name="decorator" content="default"/>
	<link href="${ctxCss}/common/listPage.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript" src="${ctxScript}/bus/vaccineManage.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {

		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>

	<style>
		.btn-yellow{
			color: #ffffff;
			text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
			background-color: #ffc266;
			*background-color: #ffc266;
			border-color: #dd5600 #dd5600 #913800;
			border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
		}
		.btn:hover {
			color: #fff;
		}
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/bus/vaccineManage/findVaccineList">疫苗维护</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="vaccineManage" action="${ctx}/bus/vaccineManage/findVaccineList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>动物种类:</label>
                <form:select path="animalTypeCode" class="input-medium" maxlength="4" style="width:251px;height:30px;" >
                    <option value="">请选择</option>
                    <form:options items="${fns:getDictList('animalType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                </form:select></li>
			<li><label>疫苗品种:</label>
                <form:select path="vaccineTypeCode" class="input-medium"  maxlength="4" style="width:251px;height:30px;" >
                    <option value="">请选择</option>
                    <form:options items="${fns:getDictList('vaccineType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                </form:select></li>
			<li>&nbsp;&nbsp;&nbsp;&nbsp;
				<form:input path="name" htmlEscape="false" maxlength="255" class="input-medium" placeholder="疫苗名称"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="btns"><input id="btnAdd" class="btn btn-yellow" style="background: #ffc266!important;" type="button" value="新增" onclick="vaccineAdd('')"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>动物种类</th>
				<th>疫苗品种</th>
				<th>疫苗名称</th>
				<shiro:hasPermission name="bus:vaccineManage:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="vaccineManage" varStatus="status">
			<tr>
				<td>${status.index+1+(page.pageNo-1)*page.pageSize}</td>
				<td>${vaccineManage.animalTypeName}</td>
				<td>${fns:getDictLabel(vaccineManage.vaccineTypeCode, 'vaccineType', '无')}</td>
				<td><a href="javascript:;" onclick="vaccineAdd('${vaccineManage.id}')">
					${vaccineManage.name}
				</a></td>
				<shiro:hasPermission name="bus:vaccineManage:edit"><td>
                    <a href="javascript:;" onclick="vaccineAdd('${vaccineManage.id}')">修改</a>
    				<%--<a href="${ctx}/bus/vaccineManage/form?id=${vaccineManage.id}">修改</a>--%>
					<a href="${ctx}/bus/vaccineManage/delete?id=${vaccineManage.id}" onclick="return confirmx('确认要删除该疫苗吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>